<?php
/**
 *      [迷你云] (C)2009-2012 南京恒为网络科技.
 *   软件仅供研究与学习使用，如需商用，请访问www.miniyun.cn获得授权
 * 
 */
?>
<?php

class MAdapterController
extends MApplicationComponent
implements MIController
{
    
    public function invoke($uri=null)
    {
        $type = $_REQUEST['type'];

        $optionOperate = new MOptionOperate();

        $app_name  = $optionOperate->getAppName();

        if ($type == "androidPhone"){
            $app_logo = $optionOperate->getAndroidLogo();
        }elseif ($type == "iPhone") {
            $app_logo = $optionOperate->getIphoneLogo();
        }elseif ($type == "iPad") {
            $app_logo = $optionOperate->getIpadLogo();
        }

        $register    = $optionOperate->getRegisterInfo();
        $find_passwd = $optionOperate->getFindPasswordInfo();
        $app_about   = $optionOperate->getCompnayInfo();

        $ret_data = array();
        $ret_data['app_name']      = $app_name;
        $ret_data['app_logo']      = $app_logo;
        $ret_data['register']      = $register;
        $ret_data['find_passwd']   = $find_passwd;
        $ret_data['filelimit']     = MUtils::convertBytes(ini_get('post_max_size'));
        $ret_data['app_about']     = $app_about;

        echo json_encode($ret_data);
    }
}
?>